def stockTransAmount(price, quantity):
    assert price > 0, '价格必须大于0'
    assert quantity >= 0, '数量不能为负数'
    return price * quantity
print(stockTransAmount(10, -100))